package com.lkd.mapper;

import com.lkd.dto.RegionDto;
import com.lkd.entity.Region;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RegionMapper {
    //分页查询
    List<Region> findList(RegionDto regionDto);

    //保存
    @Insert("insert into tb_region values (null,#{name}, #{remark})")
    Boolean save(Region region);

    //主键查询
    @Select("select * from tb_region where id = #{id}")
    Region findById(Long id);

    //修改
    Boolean update(Region region);
}
